#! /usr/bin/env python
#coding=utf-8
#This is my shopping list
shoplist = ['apple','pear','banana','mango']
print 'I have ',len(shoplist), 'in my shoplist'
print 'They are :'
for item in shoplist:
    print item
print '\n I also have to buy rice'
shoplist.append('rice')
print 'I will sort my shoplist now'
shoplist.sort()
print 'Sorted shoplist is ',shoplist
print 'The first thing I want to buy is :',shoplist[0]
olditem = shoplist[0]
del shoplist[0]
print 'I have bought ',olditem
print 'My shoplist is now ',shoplist
shoplist.reverse()
print 'reversed shoplist is',shoplist
print shoplist[-1]
print shoplist[-2]
print shoplist[1:3]
print shoplist[1:-1]
print shoplist[1:]
print shoplist[:]

